class CoinDetailModel {
  String img;
  String name;
  String time;
  String upDown;
  String cnyMoney;
  String address;
  String transferType;

  static List<CoinDetailModel> fromList(List list) {
    if (list == null) return null;
    List<CoinDetailModel> coinList = List();
    list.forEach((element) {
      CoinDetailModel model = CoinDetailModel();
      model.img = element["img"];
      model.name = element["name"];
      model.time = element["time"];
      model.upDown = element["upDown"];
      model.cnyMoney = element["cnyMoney"];
      model.address = element["address"];
      model.transferType = element["transferType"];
      coinList.add(model);
    });
    return coinList;
  }

  Map toJson() => {
    "img": img,
    "name": name,
    "time": time,
    "upDown": upDown,
    "cnyMoney": cnyMoney,
    "cny_money": cnyMoney,
    "address": address,
    "transferType": transferType,
  };
}
